/*
 * @Author: hua
 * @Date: 2020-03-08 09:47:43
 * @description:
 * @LastEditors: hua
 * @LastEditTime: 2020-04-08 09:52:30
 */
import * as React from 'react';
import {useState, useEffect} from 'react';
import {View, StyleSheet} from 'react-native';
import Icon from 'react-native-vector-icons/FontAwesome';
import {Input, Button, Text} from 'react-native-elements';
import {Image} from 'react-native';
import I18n from '../i18n';

export default function LoginScreen({navigation}) {
  const [count, setCount] = useState(0);
  const users = [];
  useEffect(() => {});
  return (
    <View style={styles.container}>
      <Input placeholder="输入登录账户" />
      <Input placeholder="输入登录密码" />
      <Button
        buttonStyle={styles.register_btn}
        title={I18n.t('login')}
        onPress={() => navigation.navigate('LoginScreen')}
      />
      <View style={styles.describe_container}>
        <Text>
          一些描述文字一些描述文字一些描述文字一些描述文字一些描述文字一些描述文字
        </Text>
      </View>
      <Image
        source={require('../assets/images/splash.png')}
        style={styles.imageStyle}
      />
    </View>
  );
}

const styles = StyleSheet.create({
  container: {
    width: '100%',
    height: '100%',
    padding: 10,
  },
  register_btn: {
    marginTop: 20,
  },
  describe_container: {
    display: 'flex',
    flexDirection: 'row',
    padding: 10,
    marginTop: 10,
  },
  imageStyle: {
    position: 'absolute',
    bottom: 20,
    left: '50%',
    marginLeft: -55,
  },
});
